From 1366ee55cc401bf8b1fbedf50451765cd577c1bf Mon Sep 17 00:00:00 2001 From: "smh22@firebug.cl.cam.ac.uk" Date: Tue, 22 Nov 2005 19:10:50 +0100 Subject: [PATCH] Avoid GPF when attempting to save / restore 64bit guests. More thought required as to best way to get M2P mfns under 64... Signed-off-by: Steven Hand --- linux-2.6-xen-sparse/drivers/xen/privcmd/privcmd.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/linux-2.6-xen-sparse/drivers/xen/privcmd/privcmd.c b/linux-2.6-xen-sparse/drivers/xen/privcmd/privcmd.c index cf0c0eb7d7..7e9aceaaae 100644 --- a/linux-2.6-xen-sparse/drivers/xen/privcmd/privcmd.c +++ b/linux-2.6-xen-sparse/drivers/xen/privcmd/privcmd.c @@ -222,6 +222,17 @@ static int privcmd_ioctl(struct inode *inode, struct file *file, unsigned long *p; int i; +#if defined (__x86_64__) + /* + ** XXX SMH: the below procedure won't work for 64 since + ** we don't have access to the memory which maps the M2P. + ** A proper fix will probably involve moving this + ** functionality to Xen - for now just return an error + ** here rather than GPF'ing in the kernel. + */ + ret = -EINVAL; + break; +#endif if (copy_from_user(&m, (void *)data, sizeof(m))) return -EFAULT; -- 2.30.2